Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /


Chapter 8 - Light Objects

This chapter describes light objects (or lights) and the functions you can use to manipulate them. You use lights to provide illumination on the objects in a model. A group of lights is associated with every view, along with camera information and other settings that affect the rendering of a model.

To use this chapter, you should already be familiar with the QuickDraw 3D class hierarchy, described in the chapter "QuickDraw 3D Objects" earlier in this book. For information about grouping lights into a light group, see the chapter "Group Objects." For information about associating a light group with a view, see the chapter "View Objects." You do not, however, need to know how to create light groups or attach them to views to read this chapter.

For the lights associated with a view to have any effect, there must also be an illumination shader associated with the view. See the chapter "Shader Objects" for information on creating illumination shaders and attaching them to views.

This chapter begins by describing light objects and their features. Then it shows how to create and manipulate lights. The section "Light Objects Reference," beginning on page 8-9 provides a complete description of light objects and the routines you can use to create and manipulate them.


Chapter Contents
About Light Objects
Ambient Light
Directional Lights
Point Lights
Spot Lights
Using Light Objects
Creating a Light
Manipulating Lights
Light Objects Reference
Constants
Light Attenuation Values
Light Fall-Off Values
Data Structures
Light Data Structure
Directional Light Data Structure
Point Light Data Structure
Spot Light Data Structure
Light Objects Routines
Managing Lights
Managing Ambient Light
Managing Directional Lights
Managing Point Lights
Managing Spot Lights
Summary of Light Objects
C Summary
Constants
Light Types
Light Attenuation Values
Light Fall-Off Values
Data Types
Light Data Structure
Directional Light Data Structure
Point Light Data Structure
Spot Light Data Structure
Light Objects Routines
Managing Lights
Managing Ambient Light
Managing Directional Lights
Managing Point Lights
Managing Spot Lights
Notices

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996